

#open(BUFF,"SureSelect_All_Exon_V4+UTRs_with_annotation_hg19_chr22.bed") or die "no file found SureSelect_All_Exon_V4+UTRs_with_annotation_hg19_chr22.bed\n";
#open(WRBUFF,">SureSelect_All_Exon_V4+UTRs_with_annotation_hg19_chr22_q13_2.bed");
open(BUFF,"/data2/bsi/RandD/s112423.DNA-SV/Exome_CNV/reference/refflat_exons_hg19.bed");
open(WRBUFF,">refflat_exons_hg19chr22_q13_2.bed") or die "not able to write the file S03723424_Probes_chr22_q13_2.txt\n";
while(<BUFF>)
{
	chomp($_);
	@array=split("\t",$_);
	if($array[0] eq "chr22" && $array[1] >=41000001 && $array[1]  <=44200000)
	{
		print WRBUFF $_."\n";
	}
}
=head

open(BUFF,"S03723424_Probes.txt") or die "no file found S03723424_Probes.txt\n";
open(WRBUFF,">S03723424_Probes_chr22_q13_2.txt") or die "not able to write the file S03723424_Probes_chr22_q13_2.txt\n";
$line=<BUFF>;
print WRBUFF $line;
while(<BUFF>)
{
	chomp($_);
	@a=split("\t",$_);
	$kk=pop(@a);
	@kk=split(":|-",$kk);
	#die "@kk\n";
	if($kk[0] eq "chr22" && $kk[1] >=41000001 && $kk[2] <=44200000)
	{
		print WRBUFF $_."\n";
	}
}
